using System;
namespace MicroMsg.Common.Audio.Amr.Resampler
{
	public class DefineConstants
	{
		public const float Q15ONE = 1f;
		public const float LPC_SCALING = 1f;
		public const float SIG_SCALING = 1f;
		public const float LSP_SCALING = 1f;
		public const float GAMMA_SCALING = 1f;
		public const float GAIN_SCALING = 1f;
		public const float GAIN_SCALING_1 = 1f;
		public const float VERY_SMALL = 1E-15f;
		public const float VERY_LARGE32 = 1E+15f;
		public const float VERY_LARGE16 = 1E+15f;
		public const float Q15_ONE = 1f;
		public const int BYTES_PER_CHAR = 1;
		public const int BITS_PER_CHAR = 8;
		public const int LOG2_BITS_PER_CHAR = 3;
		public const int RESAMPLER_QUALITY_MAX = 10;
		public const int RESAMPLER_QUALITY_MIN = 0;
		public const int RESAMPLER_QUALITY_DEFAULT = 4;
		public const int RESAMPLER_QUALITY_VOIP = 3;
		public const int RESAMPLER_QUALITY_DESKTOP = 5;
		public const int RESAMPLER_ERR_SUCCESS = 0;
		public const int RESAMPLER_ERR_ALLOC_FAILED = 1;
		public const int RESAMPLER_ERR_BAD_STATE = 2;
		public const int RESAMPLER_ERR_INVALID_ARG = 3;
		public const int RESAMPLER_ERR_PTR_OVERLAP = 4;
		public const int RESAMPLER_ERR_MAX_ERROR = 5;
		public const float M_PI = 3.14159274f;
		public const int FILTER_SIZE = 64;
		public const int OVERSAMPLE = 8;
		public const int NULL = 0;
		public static double[] kaiser12_table = new double[]
		{
			0.99859849,
			1.0,
			0.99859849,
			0.99440475,
			0.98745105,
			0.97779076,
			0.9654977,
			0.95066529,
			0.93340547,
			0.91384741,
			0.89213598,
			0.86843014,
			0.84290116,
			0.81573067,
			0.78710866,
			0.75723148,
			0.7262997,
			0.69451601,
			0.66208321,
			0.62920216,
			0.59606986,
			0.56287762,
			0.52980938,
			0.49704014,
			0.46473455,
			0.43304576,
			0.40211431,
			0.37206735,
			0.343018,
			0.3150649,
			0.28829195,
			0.26276832,
			0.23854851,
			0.21567274,
			0.19416736,
			0.17404546,
			0.15530766,
			0.13794294,
			0.12192957,
			0.10723616,
			0.09382272,
			0.08164178,
			0.0706395,
			0.06075685,
			0.05193064,
			0.04409466,
			0.03718069,
			0.03111947,
			0.02584161,
			0.02127838,
			0.0173625,
			0.01402878,
			0.01121463,
			0.00886058,
			0.00691064,
			0.00531256,
			0.00401805,
			0.00298291,
			0.00216702,
			0.00153438,
			0.00105297,
			0.00069463,
			0.00043489,
			0.00025272,
			0.00013031,
			5.27734E-05,
			1E-05,
			0.0
		};
		public static double[] kaiser10_table = new double[]
		{
			0.99537781,
			1.0,
			0.99537781,
			0.98162644,
			0.95908712,
			0.92831446,
			0.89005583,
			0.84522401,
			0.79486424,
			0.74011713,
			0.68217934,
			0.62226347,
			0.56155915,
			0.5011968,
			0.44221549,
			0.38553619,
			0.33194107,
			0.28205962,
			0.23636152,
			0.19515633,
			0.15859932,
			0.1267028,
			0.09935205,
			0.07632451,
			0.05731132,
			0.0419398,
			0.02979584,
			0.0204451,
			0.01345224,
			0.00839739,
			0.00488951,
			0.00257636,
			0.00115101,
			0.00035515,
			0.0,
			0.0
		};
		public static double[] kaiser8_table = new double[]
		{
			0.99635258,
			1.0,
			0.99635258,
			0.98548012,
			0.96759014,
			0.943022,
			0.91223751,
			0.87580811,
			0.83439927,
			0.78875245,
			0.73966538,
			0.68797126,
			0.6345175,
			0.58014482,
			0.52566725,
			0.47185369,
			0.4194115,
			0.36897272,
			0.32108304,
			0.27619388,
			0.23465776,
			0.1967267,
			0.1625538,
			0.13219758,
			0.10562887,
			0.08273982,
			0.06335451,
			0.04724088,
			0.03412321,
			0.0236949,
			0.01563093,
			0.00959968,
			0.00527363,
			0.00233883,
			0.0005,
			0.0
		};
		public static double[] kaiser6_table = new double[]
		{
			0.99733006,
			1.0,
			0.99733006,
			0.98935595,
			0.97618418,
			0.95799003,
			0.93501423,
			0.90755855,
			0.87598009,
			0.84068475,
			0.80211977,
			0.76076565,
			0.71712752,
			0.67172623,
			0.62508937,
			0.57774224,
			0.53019925,
			0.48295561,
			0.43647969,
			0.39120616,
			0.34752997,
			0.30580127,
			0.26632152,
			0.22934058,
			0.19505503,
			0.16360756,
			0.13508755,
			0.10953262,
			0.0869312,
			0.067226,
			0.0503182,
			0.03607231,
			0.02432151,
			0.01487334,
			0.00752,
			0.0
		};
		public static FuncDef _KAISER12 = new FuncDef(DefineConstants.kaiser12_table, 64);
		public static FuncDef KAISER12 = DefineConstants._KAISER12;
		public static FuncDef _KAISER10 = new FuncDef(DefineConstants.kaiser10_table, 32);
		public static FuncDef KAISER10 = DefineConstants._KAISER10;
		public static FuncDef _KAISER8 = new FuncDef(DefineConstants.kaiser8_table, 32);
		public static FuncDef KAISER8 = DefineConstants._KAISER8;
		public static FuncDef _KAISER6 = new FuncDef(DefineConstants.kaiser6_table, 32);
		public static FuncDef KAISER6 = DefineConstants._KAISER6;
		public static QualityMapping[] quality_map = new QualityMapping[]
		{
			new QualityMapping(8, 4, 0.83f, 0.86f, DefineConstants.KAISER6),
			new QualityMapping(16, 4, 0.85f, 0.88f, DefineConstants.KAISER6),
			new QualityMapping(32, 4, 0.882f, 0.91f, DefineConstants.KAISER6),
			new QualityMapping(48, 8, 0.895f, 0.917f, DefineConstants.KAISER8),
			new QualityMapping(64, 8, 0.921f, 0.94f, DefineConstants.KAISER8),
			new QualityMapping(80, 16, 0.922f, 0.94f, DefineConstants.KAISER10),
			new QualityMapping(96, 16, 0.94f, 0.945f, DefineConstants.KAISER10),
			new QualityMapping(128, 16, 0.95f, 0.95f, DefineConstants.KAISER10),
			new QualityMapping(160, 16, 0.96f, 0.96f, DefineConstants.KAISER10),
			new QualityMapping(192, 32, 0.968f, 0.968f, DefineConstants.KAISER12),
			new QualityMapping(256, 32, 0.975f, 0.975f, DefineConstants.KAISER12)
		};
	}
}
